/*
    定义每一个分模块功能的路由映射关系
*/
import Film from '@/views/film/Film'
import NowPlaying from "@/views/film/NowPlaying";
import ComingSoon from "@/views/film/ComingSoon";

const routes = [
  // 正在热映
  {
    // url地址路径
    path: "/film",
    // 加载的组件
    component: Film,
    // 路由重定向
    redirect:'./film/NowPlaying',
    // 嵌套子路由
    children:[
      {
        // url地址路径
        path: "NowPlaying",
        // 加载的组件
        component: NowPlaying,
      },
      {
        // url地址路径
        path: "ComingSoon",
        // 加载的组件
        component: ComingSoon,
      },
    ]
  },
  // 电影详情
  {
    path:'/film/:id',
    component:()=>import('@/views/film/Detail')
  }

];
// 导出分模块的路径映射配置
export default routes